#include<iostream>
using namespace std;
int main() {
  int arr[7] = {1, 2, 5, 89, 34, 23, 6};
  for (int i = 6; i >0; i--)
  {
    for (int j = 0; j < i; j++)
    {
      if(arr[j] > arr[j+1]) {
        const int next = arr[j+1];
        arr[j+1] = arr[j];
        arr[j] = next;
      }
    }
  }

  for (int i = 0; i < 6; i++)
  {
    cout << arr[i] << ' ';
  }
}